package com.xul.crowd.mapper;


import com.xul.entity.po.ProjectPO;
import com.xul.entity.po.ProjectPOExample;
import com.xul.entity.vo.DetailProjectVO;
import com.xul.entity.vo.PortalTypeVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectPOMapper {
    int countByExample(ProjectPOExample example);

    int deleteByExample(ProjectPOExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(ProjectPO record);

    int insertSelective(ProjectPO record);

    List<ProjectPO> selectByExample(ProjectPOExample example);

    ProjectPO selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByExample(@Param("record") ProjectPO record, @Param("example") ProjectPOExample example);

    int updateByPrimaryKeySelective(ProjectPO record);

    int updateByPrimaryKey(ProjectPO record);

    /**
     * 保存项目 分类关联的关系信息
     * @param typeIdList
     * @param projectId
     */
    void insertTypeRelationship(@Param("typeIdList") List<Integer> typeIdList,@Param("projectId") Integer projectId);

    /**
     * 保存项目 标签的关联信息
     * @param tagIdList
     * @param projectId
     */
    void insertTagRelationship(@Param("tagIdList") List<Integer> tagIdList,@Param("projectId") Integer projectId);

    /**
     * 根据t_type的id查询到相应的分类t_project信息数据
     * @return
     */
    List<PortalTypeVO> selectPortalTypeVOList();

    /**
     * 根据projectId查询出详情信息 包括回报数据 头图数据 三表关联
     * @param projectId
     * @return
     */
    DetailProjectVO selectDetailProjectVO(Integer projectId);
}